import React,{FC,useRef} from 'react'
import Button,{Buttontype} from '../Button/button'
import axios from 'axios'

interface UploadProps{
    actions:string;
    onProgress?:(precentage:number,file:File)=>void;
    onSuccess?:(data:any,file:File) =>void;
    onError?:(err:any,file:File)=>void;
}


export const Upload:FC<UploadProps> = (props)=>{
    const inputRef = useRef<HTMLInputElement>(null)
    const {
        actions,
        onProgress,
        onSuccess,
        onError
    } = props;

    return (
        <div>
            <Button btnType={Buttontype.Primary}>upload files</Button>
            <input
            ref={inputRef}
            type="file" style={{display:'none'}}/>
        </div>
    )
}

export default Upload